doctype html
html(lang="en")
  head
    meta(charset="utf-8")
    meta(name="viewport",content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0")
    title= pageTitle    

    link(rel="stylesheet",type="text/css",href="/statics/css/bootstrap.min.css" )
    link(rel="stylesheet",type="text/css",href="/statics/css/font-awesome.min.css" )

  body
    nav.navbar.navbar-fixed-top
      .container
        ul.nav.navbar-nav
          li
            a(href='/') 首页

    .container
      .page-header.text-center 
        h1.lead='公共项目'

      if(projects && projects.length)
        .row
          each project,index in projects
            .col-sm-4
              iframe(style='width:100%;height:720px',src='/project/'+project._id)       
              p=project.title+' by '+project.email
              img(src=qrcodes[index])       
              a.btn.glyphicon.glyphicon-duplicate(href="/edit?template="+project._id) 基于此模板编辑

      nav(aria-label='Page navigation')
        ul.pagination
          li
            a(href='/view?page=0', aria-label='First')
              span(aria-hidden='true') |〈
          if(page>0)
            li
              a(href='/view?page='+(page-1), aria-label='Previous')
                span(aria-hidden='true') «
          li
            a(href='#')=(page+1)
          
          if(page<pageCount-1)
            li
              a(href='/view?page='+(page+1), aria-label='Next')
                span(aria-hidden='true') »
          li
            a(href='/view?page='+(pageCount-1), aria-label='Last')
              span(aria-hidden='true') 〉|